#创建字典
monthdays = {'Jan':31,'Feb':28,'Mar':31,'Apr':30,'May':31,'Jun':30,
             'Jul':31,'Aug':31,'Sep':30,'Oct':31,'Thi':40}
#创建新的字典 & 追加进去
x = {'Nov':30,'Dec':31}
monthdays.update(x)
#删除
del monthdays['Thi']
#修改
monthdays['Feb'] = 29
#获取值并输出
print("Oct:",monthdays.get('Oct'))
#获取不存在的值
print(monthdays.get("Xyz","Not Found"))

#输出字典的键 值 键值对
print(monthdays.keys())
print(monthdays.values())
print(monthdays.items())

